/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package trackmsg;

import base.TrackNode;
import base.TrackNode.Echo;
import base.WaveEnvironment;

/**
 *
 * @author Tue
 */
public class EchoMsg extends TrackCtrlMsg{
    private TrackNode fromTrack;
    private Echo echo;
    private WaveEnvironment waveEnv;   

    public EchoMsg(TrackNode fromTrack, Echo echo){
        this.fromTrack = fromTrack;
        this.echo = echo;
    }
    public EchoMsg(TrackNode fromTrack, Echo echo, WaveEnvironment waveEnv){
        this.fromTrack = fromTrack;
        this.echo = echo;
        this.waveEnv = waveEnv;
    }

    public Echo getEcho() {
        return echo;
    }

    public TrackNode getFromTrack() {
        return fromTrack;
    }    

    public WaveEnvironment getWaveEnv(){
        return waveEnv;
    }
    @Override
    public Type getType() {
        return Type.ECHO;
    }
    @Override
    public String toString() {
        return "MESSAGE: " + getType() + " " + getEcho() + " " +
                getFromTrack().getAddress() + " " + waveEnv;
    }
}
